﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WeChatSDK.WeChatDto.Conversation.ReceivingMessage.EventMessage
{
    /// <summary>
    /// 弹出系统拍照发图的事件
    /// </summary>
    [XmlRoot(Namespace = "", IsNullable = false, ElementName = "xml")]
    public class PicSysphotoEventMessageDto:EventMessageDto
    {
        /// <summary>
        /// 事件KEY值，由开发者在创建菜单时设定
        /// </summary>
        [XmlElement("EventKey", DataType = "string")]
        public string EventKey { get; set; }
        /// <summary>
        /// 发送的图片信息
        /// </summary>
        [XmlArray("SendPicsInfo")]
        public List<SendPicsInfoDto> SendPicsInfo { get; set; }
    }
    /// <summary>
    /// 发送的图片信息
    /// </summary>
    [XmlType]
    public class SendPicsInfoDto
    {
        /// <summary>
        /// 发送的图片数量
        /// </summary>
        [XmlElement("Count", DataType = "string")]
        public int Count { get; set; }
        /// <summary>
        /// 图片列表
        /// </summary>
        [XmlArray("PicList")]
        public List<PicDto> PicList { get; set; }
    }
    /// <summary>
    /// 图片列表项
    /// </summary>
    [XmlType("item")]
    public class PicDto
    {
        /// <summary>
        /// 图片的MD5值，开发者若需要，可用于验证接收到图片
        /// </summary>
        [XmlElement("PicMd5Sum", DataType = "string")]
        public int PicMd5Sum { get; set; }
    }
}
